package oop.类和方法和构造器;

/**
 * @ClassName : AfterPerson
 * @Author : LV88VL
 * @Date: 2021/2/4 21:09
 * @Description : 继承、this、super的区别
 */
public class AfterPerson extends Person{
    public AfterPerson() {
    }

    public AfterPerson(String name, int age, String sex) {
        super(name, age, sex);
    }
    public void extand(){
        System.out.println(super.name+"正在进一步扩张领土");
    }
    public void unextand(){
        System.out.println(super.name+"领土被攻略");
    }
    String name="kingson";

    public void  test(String name){
        System.out.println(name);
        System.out.println(this.name);
        System.out.println(super.name);
    }
}
